package com.ruoyi.agency.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.agency.mapper.AgencyMapper;
import com.ruoyi.agency.domain.Agency;
import com.ruoyi.agency.service.IAgencyService;

/**
 * 机构信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-01
 */
@Service
public class AgencyServiceImpl implements IAgencyService 
{
    @Autowired
    private AgencyMapper agencyMapper;

    /**
     * 查询机构信息
     * 
     * @param agencyId 机构信息主键
     * @return 机构信息
     */
    @Override
    public Agency selectAgencyByAgencyId(Long agencyId)
    {
        return agencyMapper.selectAgencyByAgencyId(agencyId);
    }

    /**
     * 查询机构信息列表
     * 
     * @param agency 机构信息
     * @return 机构信息
     */
    @Override
    public List<Agency> selectAgencyList(Agency agency)
    {
        return agencyMapper.selectAgencyList(agency);
    }

    /**
     * 新增机构信息
     * 
     * @param agency 机构信息
     * @return 结果
     */
    @Override
    public int insertAgency(Agency agency)
    {
        return agencyMapper.insertAgency(agency);
    }

    /**
     * 修改机构信息
     * 
     * @param agency 机构信息
     * @return 结果
     */
    @Override
    public int updateAgency(Agency agency)
    {
        return agencyMapper.updateAgency(agency);
    }

    /**
     * 批量删除机构信息
     * 
     * @param agencyIds 需要删除的机构信息主键
     * @return 结果
     */
    @Override
    public int deleteAgencyByAgencyIds(Long[] agencyIds)
    {
        return agencyMapper.deleteAgencyByAgencyIds(agencyIds);
    }

    /**
     * 删除机构信息信息
     * 
     * @param agencyId 机构信息主键
     * @return 结果
     */
    @Override
    public int deleteAgencyByAgencyId(Long agencyId)
    {
        return agencyMapper.deleteAgencyByAgencyId(agencyId);
    }
}
